package com.lvmama.controller.dw.priceStock;

import java.util.List;

import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lvmama.common.result.Result;
import com.lvmama.pojo.entity.dw.priceStock.StockAndPriceSearch;
import com.lvmama.service.dw.StockAndPriceSearchService;

/**
 * @Author:xuzhongwei
 * @Description:
 * @Date：2018/08/06
 */
@RestController
@RequestMapping("/stockPriceSearch")
@Slf4j
public class StockAndPriceSearchController {

    @Autowired
    StockAndPriceSearchService stockAndPriceSearchService;

    /**
     * 获取品类列表
     * @return 品类列表
     */
    @GetMapping("/selectCategoryList")
    public Result<List<StockAndPriceSearch>> selectCategoryList() {
        log.info("selectCategoryList start");
        Result<List<StockAndPriceSearch>> result = stockAndPriceSearchService.selectCategoryList();
        log.info("result: " + result.toString());
        log.info("selectCategoryList end");
        return result;
    }
    
    /**
     * 查询销售渠道列表
     * @return 销售渠道列表
     */
    @GetMapping("/selectChannelList")
    public Result<List<StockAndPriceSearch>> selectChannelList() {
    	return stockAndPriceSearchService.selectChannelList();
    }
    
    /**
     * 查询大区列表
     * @return 大区列表
     */
    @GetMapping("/selectProductList")
    public Result<List<StockAndPriceSearch>> selectProductList() {
    	return stockAndPriceSearchService.selectProductList();
    }
    
    /**
     * 根据大区查询产品经理列表
     * @param regionname 查询条件
     * @return 产品经理列表
     */
    @GetMapping("/selectProductManagerList")
    public Result<List<StockAndPriceSearch>> selectProductManagerList(String regioname) {
    	return stockAndPriceSearchService.selectProductManagerList(regioname);
    }
    
    /**
     * 查询大区列表
     * @return 大区列表
     */
    @GetMapping("/selectRegionList")
    public Result<List<StockAndPriceSearch>> selectRegionList() {
    	return stockAndPriceSearchService.selectRegionList();
    }
    
    /**
     * 查询供应商列表
     * @return 供应商列表
     */
    @GetMapping("/selectSupperNameList")
    public Result<List<StockAndPriceSearch>> selectSupperNameList() {
    	return stockAndPriceSearchService.selectSupperNameList();
    }
    
    /**
     * 查询供应商类型列表
     * @return 供应商类型列表
     */
    @GetMapping("/selectSupperTypeList")
    public Result<List<StockAndPriceSearch>> selectSupperTypeList() {
    	return stockAndPriceSearchService.selectSupperTypeList();
    }

}
